import axios from 'axios';
export const getServicePersonList = async (data) => {
    try {  
        const response = await axios.post('/serviceUser/getList',data);
        return response.data;
    } catch (error) {
        console.error('获取服务人员列表失败', error);
        return { success: false, message: '获取服务人员列表失败' };
    }
}


export const saveServicePerson = async (data) => {
    try {  
        const response = await axios.post('/serviceUser/saveServiceUser',data);
        return response.data;
    } catch (error) {
        console.error('保存服务人员失败', error);
        return { success: false, message: '失败' };
    }
}
// 服务人员详情
export const getServicePerson = async (data) => {
    try {  
        const response = await axios.get('/serviceUser/getDetail',{params:{id:data.id}});
        return response.data;
    } catch (error) {
        console.error('获取详情失败', error);
        return { success: false, message: '失败' };
    }
}